#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...)                             \
	{                                         \
		cerr << "\033[32;1m" << #x << " -> "; \
		err(x);                               \
	}
void err()
{
	cerr << "\033[39;0m" << endl;
}
template <typename T, typename... A>
void err(T a, A... x)
{
	cerr << a << ' ';
	err(x...);
}
#else
#define dbg(...)
#endif

typedef long long LL;

int n;
typedef pair<int, int> P;

const int N = 1e3 + 5;

P a[N];

inline int id(const P &p)
{
	return (p.first & 1) << 1 | (p.second & 1);
}

#define count _count
int count(P a[], int n, int b[])
{
	int res = 0;
	memset(b, 0, sizeof(int) * 4);
	for (int i = 0; i < n; ++i)
	{
		++b[id(a[i])];
	}
	for (int i = 0; i < 4; ++i)
		res += b[i] > 0;
	return res;
}

P operator+(const P &a, const P &b)
{
	return P(a.first + b.first, a.second + b.second);
}
P operator/(const P &a, const int &b)
{
	return P(a.first / b, a.second / b);
}

int main(int argc, char const *argv[])
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cin >> n;
	int minv = 0x7fffffff;
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i].first >> a[i].second;
		minv = min(minv, a[i].first);
		minv = min(minv, a[i].second);
	}

	{
		P px(-minv, -minv);
		for (int i=0; i<n; ++i)
			a[i] = (a[i] + px);
	}
	
	int b[4], cnt;
	for (cnt = count(a, n, b); cnt == 1; cnt = count(a, n, b))
	{
		int idx = id(a[0]);
	
		P p(0, 0);
		if (idx == 1)
			p = P(0, 1);
		else if (idx == 2)
			p = P(1, 0);
		else
			p = P(1, 1);
		for (int i = 0; i < n; ++i)
		{
			a[i] = (a[i] + p) / 2;
		}
	}

	vector<int> ans;
	dbg(cnt);
	for (int i=0; i<n; ++i)
	{
		dbg(i, a[i].first, a[i].second, id(a[i]));
	}
	if ((b[0] + b[3]) > 0 && (b[0] + b[3]) < n)
	{
		for (int i = 0; i < n; ++i)
		{
			if (id(a[i]) == 0 || id(a[i]) == 3)
			{
				ans.push_back(i + 1);
			}
		}
	}
	else
	{
		if (id(a[0]) == 1 || id(a[0]) == 2)
			for (int i = 0; i < n; ++i)
			{
				a[i] = a[i] + P(0, 1);
			}
		for (int i = 0; i < n; ++i)
		{
			if (id(a[i]) == 0)
				ans.push_back(i + 1);
		}
	}
	printf("%d\n", (int)ans.size());
	for (int i=0; i<(int)ans.size(); ++i)
		printf("%d%c", ans[i], i==ans.size()-1? '\n' : ' ');

	return 0;
}